package com.todod.service;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.todod.dto.UserDto;
import com.todod.entity.QueryEntry;
import com.todod.entity.ResUser;
import com.todod.model.User;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author gsh
 * @since 2020-10-14
 */
public interface IUserService extends IService<User> {

	User login(String userName, String password);

	User getByUsernameAndPassword(String username, String password);

	User getByUsername(String username);

	IPage<UserDto> getList(QueryEntry queryEntry);

	IPage<UserDto> getDnameList(QueryEntry queryEntry);

	void saveData(Long _userId, ResUser user);

	void updateState(Long _userId, Long userId, String state);

	void editPasssWord(Long _userId, Long userId, String password);

	User getUserById(Long id);

	List<User> getAllUser();

	/**
	 * 根据部门id集合获取
	 * 
	 * @Title: getListByDepartmentIds
	 * @Description:
	 * @author gsh
	 * @date 2021年1月9日
	 * @param did
	 * @return
	 */
	List<User> getListByDepartmentIds(List<Long> did);

	/**
	 * 获取全部用户
	 * 
	 * @Title: getAllList
	 * @Description:
	 * @author gsh
	 * @date 2021年1月20日
	 * @return
	 */
	List<User> getAllList();

	List<User> getUserList(Long departid);
}
